Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1112 ec sei params #1136

Merged
merged 27 commits into from
Sep 5, 2020
Merged

Issue 1112 ec sei params #1136

merged 27 commits into from
Sep 5, 2020

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Sep 4, 2020

Description

  • Adds new variables used to track the total lithium concentration (thanks @ferranbrosa !)
  • Fix a bug where not all parameters are set by the EC SEI model (e.g. loss of lithium)
  • Slightly reformat the way variables related to concentration are set by the sei models

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #1112 and #1117

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works


c_e_typ = self.param.c_e_typ
L_x = self.param.L_x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be epsilon * c_e here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I think there should be a better way to do #1112 .

Also, there are some .pkl files in examples/notebooks to remove. They should probably be removed when running the notebooks (using os.remove)


c_e_typ = self.param.c_e_typ
L_x = self.param.L_x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

@@ -131,3 +111,48 @@ def set_initial_conditions(self, variables):
j_sei_0 = pybamm.Scalar(0)

self.initial_conditions = {L_sei: L_sei_0, j_sei: j_sei_0}

def _get_standard_concentraion_variables(self, variables):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this function is only ever called from get_coupled_variables, there is no need to make it a separate function. Ideally, we should find a way to make it use the method from base_sei (e.g. with inner set to 0 and outer representing the total)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, makes sense. will change now, thanks

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rtimms , merging

@valentinsulzer valentinsulzer merged commit f5a2233 into develop Sep 5, 2020
@valentinsulzer valentinsulzer deleted the issue-1112-EC-sei-params branch September 5, 2020 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some parameters not getting set by EC SEI submodel
3 participants